package com.sample.util;

import java.util.TreeMap;

public class TestTreeMap {

	public static void main(String[] args) {
		TreeMap<String, Double> map = new TreeMap<String, Double>();
		map.put("1", 89.0);
		map.put("2", 80.0);
		map.put("3", 80.0);

		map.put("1-1", 89.0);
		map.put("1-1-1", 89.0);
		map.put("1-1-2", 89.0);

		map.put("1-2", 89.0);
		map.put("1-2-1", 89.0);
		map.put("1-2-1-1", 89.0);
		map.put("1-2-1-2", 89.0);
		map.put("1-2-2", 89.0);
		map.put("1-2-3", 89.0);

		map.put("2-1", 89.0);
		map.put("2-1-1", 89.0);
		map.put("2-2", 89.0);
		map.put("2-2-1", 89.0);

		map.put("3-1", 89.0);
		map.put("3-1-1", 89.0);
		map.put("3-1-1-1", 89.0);
		
		
		
//		Iterator<String> keyItera = map.keySet().iterator();
//		while(keyItera.hasNext()){
//			
//		}
		
		printMap(map);
	}
	
	public static void printMap(TreeMap<String, Double> map){
		System.out.println("ceilingEntry = " + map.ceilingEntry("1-2-1"));
		System.out.println("ceilingKey = " + map.ceilingKey("1-2-1"));
		System.out.println("ceilingKey = " + map.descendingKeySet());
	}

}
